package com.i2works.smartluolong.web.service.company;

import com.alibaba.fastjson.JSONObject;
import com.i2works.smartluolong.utils.basecommon.BaseCommonService;
import com.i2works.smartluolong.utils.exception.ServiceException;
import com.i2works.smartluolong.web.entity.company.CompanyApplyDO;
import com.i2works.smartluolong.web.entity.company.CompanyApplyQuery;

import java.util.List;
import java.util.Map;

/**
 * 工商注册 - 业务层接口
 *
 * @author Liu Yutao <koal@vip.qq.com>
 * @date 2018/3/14 16:36
 */

public interface ICompanyApplyService extends BaseCommonService<CompanyApplyQuery, CompanyApplyDO> {

    /**
     * 获取审核人员可管理的申请列表
     */
    List<CompanyApplyDO> queryListByAuditor(CompanyApplyQuery query) throws ServiceException;


    /**
     * 获取审核人员可管理的申请列表统计
     */
    Integer queryCountByAuditor(CompanyApplyQuery query) throws ServiceException;

    /**
     * 获取申请资料详情
     */
    Map<String,Object> getApplyDetail(Integer applyId) throws ServiceException;

    /**
     * 更新申请状态
     *
     * @param companyApplyDO 申请实体
     * @param auditorId      审核人员ID
     * @param isClaim        是否认领状态
     */
    void updateApplyStatus(CompanyApplyDO companyApplyDO, Integer auditorId, Boolean isClaim) throws ServiceException;

    /**
     * 查询证件领取人的手机号（法人和代办人）
     */
    String queryPhoneByCertHolder(CompanyApplyQuery query) throws ServiceException;


    /**
     * 查询证件领取人的身份证号（法人和代办人）
     */
    String queryIdcardByCertHolder(CompanyApplyQuery query) throws ServiceException;


    /**
     * 查询报表列表
     */
    List<JSONObject> queryReportList(CompanyApplyQuery query) throws ServiceException;

}
